import React from 'react';
import {Text, View} from 'react-native';
import {StyleSheet} from 'react-native';
import {connect} from 'react-redux';
import {IState} from '@/common/type';
const style = StyleSheet.create({
  detail: {
    color: 'black',
  },
});

function Detail({route, value}: {route: any; value: any}) {
  // let {count} = useSelector(state => state.counter);
  return (
    <View>
      <Text style={style.detail}>这是详情223333333, {route.params?.id}</Text>
      <Text>这是从redux读取的----{value}</Text>
    </View>
  );
}

const DetailContainer = connect((state: IState) => ({
  value: state.counter.count,
}))(Detail);

export default DetailContainer;
